package com.hht.toolanduilibs.util

import android.media.MediaActionSound


/**
 * Author:chen'hu
 * Time:2024/5/17 12:28
 * Description:This is ActionSoundHelp
 */
object ActionSoundHelp {
    private val mActionSound = MediaActionSound()

    init {
        mActionSound.load(MediaActionSound.SHUTTER_CLICK)
    }

    fun playActionSound() {
        try {
            mActionSound.play(MediaActionSound.SHUTTER_CLICK)
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

    fun release() {
        mActionSound.release()
    }
}